<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单页面</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
        function pay(){
            $.ajax({
                url:'http://localhost:3000/users/pay',
                type:'get',
                dataType:'json',
                success:function(res){
                    location.href = res.data
                }
            })
        }
    </script>
</head>
<body>
    <div>
        <button onclick="pay()">去支付</button>
    </div>
</body>
</html>